<template>
	<QForm ref="formRef" :gutter="20" :col="8" :model="FormValue" :form-options="formOptions"
		   :buttons="['search', 'reset']">

	</QForm>
</template>

<script setup lang="ts" name="base">
import { ref, reactive } from "vue";
import { QForm, type FormItemRows } from "@meetjs/element-plus-kit";

const opts1 = [{ label: "选项1", value: "1" }, { label: "选项2", value: "2" }];

const opts = ref(opts1);
const formRef = ref<any>(null);
const FormValue = ref({
	formPos: 'top',
	formItemPos: 'left',
	formSize: 'default',
	labelWidth: 100
});

const formItems = [
	{
		type: "input",
		label: "项目编号",
		prop: "projectNo"
	},
	{
		type: "input",
		label: "项目名称",
		prop: "projectName"
	},
	{
		type: "input",
		label: "客户名称",
		prop: "name"
	},
	{
		type: "select",
		label: "甲方负责人",
		prop: "partyAName",
		options: [
			{ label: "向伟", value: "向伟" },
			{ label: "陈露红", value: "陈露红" }
		]
	},
	{
		type: "input",
		label: "乙方负责人",
		prop: "partyBName"
	},
	{
		type: "date-picker",
		label: "创建时间",
		prop: "createTime",
		attrs: {
			type: "date"
		}
	}
];



const formOptions = reactive<FormItemRows[]>(formItems);

const onSearch = () => {
	console.log(FormValue.value);
};
</script>
<style lang="scss" scoped></style>
